package org.lee.bean.domain2

import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.NamedNativeQueries
import javax.persistence.NamedNativeQuery

import org.lee.bean.common.CustomBean;

@NamedNativeQuery(
	name=CustomBean2.TEST_QUERY2
	, query="""
select 
	p.id
	, p.name
	, pp.blog 
from 
	person2 p join person_profile2 pp on p.id = pp.id 
where p.id = ?
"""
	, resultClass=CustomBean2.class)
@Entity
class CustomBean2 extends CustomBean {
	public final static String TEST_QUERY2 = "testQuery2"
	
//	@Id int id
//	String name
//	String blog
}
